From: Eli Zaretskii Date: Mon, 22 Aug 2011 17:00:40 +0000 (+0300) Subject: Fix vertical cursor motion under bidi on auto-composed characters. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~2513 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=095c57865f8508dafb7baef3daf5b4770412eeac;p=emacs.git Fix vertical cursor motion under bidi on auto-composed characters. src/xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, consider it a hit if to_charpos is anywhere in the range of the composed buffer positions. --- diff --git a/src/ChangeLog b/src/ChangeLog index ac30342c1e5..b0762f49b12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Eli Zaretskii + + * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, + consider it a hit if to_charpos is anywhere in the range of the + composed buffer positions. + 2011-08-22 Chong Yidong * image.c (gif_load): Don't assume that each subimage has the same diff --git a/src/xdisp.c b/src/xdisp.c index e773830800e..1878327480f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7699,7 +7699,12 @@ move_it_in_display_line_to (struct it *it, ((op & MOVE_TO_POS) != 0 \ && BUFFERP (it->object) \ && (IT_CHARPOS (*it) == to_charpos \ - || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos)) \ + || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ + || (it->what == IT_COMPOSITION \ + && ((IT_CHARPOS (*it) > to_charpos \ + && to_charpos >= it->cmp_it.charpos) \ + || (IT_CHARPOS (*it) < to_charpos \ + && to_charpos <= it->cmp_it.charpos)))) \ && (it->method == GET_FROM_BUFFER \ || (it->method == GET_FROM_DISPLAY_VECTOR \ && it->dpvec + it->current.dpvec_index + 1 >= it->dpend)))